package cn.itcast.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @desc:
 * @author: panxiyi
 * @date: 2023/5/21 9:32 下午
 */

@ConfigurationProperties(prefix = "tools.ip")
@Component("ipProperties")
@Data
public class IpProperties {

    /**
     * 日志显示周期
     */
    private Long cycle = 5L;

    /**
     * 是否周期内重置数据
     */
    private Boolean cycleReset = false;

    private String model = LogModel.DETAIL.value;

    public enum LogModel {
        DETAIL("detail"),
        SIMPLE("simple");

        private String value;

         LogModel(String value) {
             this.value = value;
         }

        public String getValue() {
            return value;
        }
    }

}
